networking 您所在的位置:网站首页 default switch networking

networking

2022-06-10 15:08| 来源: 网络整理| 查看: 265

0

I found an alternative solution as neither changing the IP of the HyperV default switch via netsh nor creating an alternative switch worked for me. Instead of directly changing the IP of the Hyper-V adapter we can restrict the possibilities for the algorithm granting the IP addreses to the switch by adding loopback interfaces that block IP ranges. Loopback interfaces can be introduced using hdwwiz.exe > Next > "..manually select from a list" > Network Adapters > Manufacturer Microsoft > Microsoft KM-TEST Loopback Adapters The IP address and subnet mask for the loopback adapter can be set by "view network connections", right click the newly created interface > Properties/Internet Protocol Version4 /Properties

We can exploit that the subnet mask of the Hyper V default switch seems to be constantly at 255.255.240.0. So within the 192.168.x range it always uses one of 192.168.0.1, 192.168.16.1, 192.168.32.1 ... 192.168.240.1 as IP addresses. We can introduce e.g. a loopback interface with IP 192.168.0.1 and subnet mask 255.255.128.0, that will block all IPs from 192.168.0.1 to 192.168.127.255 Now introduce another one with IP 192.168.128.1 and subnet mask 255.255.192.0, that will block all IPs from 192.168.128.1 to 192.168.191.255 Another one could be IP 192.168.192.1 with subnet mask 255.255.224.0, blocking 192.168.192.1 to 192.168.223.255 If you know also block 192.168.240.1 via a loopback interface using IP 192.168.240.1 and subnet mask 255.255.255.0 the only possible IP address the Hyper V adapter can have is 192.168.224.1 while there's still plenty of IP addresses available in the 192.168 range. Maybe its necessary to block the 172.16.x range in the same manner. On the other hand it might also be necessary for you to be less retsrictive in the 192.168.0.x range if there are devices relying on these to be available. There seems to be the possibility to introduce loopback interfaces via Powershell scripts but haven't tried that so far.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有